home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / qbckfr.arc / TSTAVAIL.ASC < prev   
Text File  |  1986-06-25  |  2KB  |  62 lines

  1.     'TSTAVAIL.ASC / Test Program for CSS Available Disk Space Routine
  2.     '(c) COPYRIGHT Cyberphilia Software Solutions, New York, NY 1986.
  3.     '
  4.     'Parameters: DRV% ....... drive specifier
  5.     '            CLAVAIL% ... available clusters
  6.     '            CLSIZE% .... bytes per cluster
  7.     '
  8.     '
  9.     'CALLing Considerations:
  10.     '
  11.     'From BASIC ... CALL CSSAVAIL(DRV%,CLAVAIL%,CLSIZE%)
  12.     '
  13.     '     Where ... DRV%     is 0 for default, 1 for A, 2 for B, etc.
  14.     '               CLAVAIL% is initialized to 0 before call
  15.     '               CLSIZE%  is initialized to 0 before call
  16.     '
  17.     '
  18.     'CALL Return Considerations:
  19.     '
  20.     '  DRV%       will be set to FFFFh if drive specified is invalid
  21.     '
  22.     '  To determine number of bytes available on specified drive
  23.     '  simply multiply CLAVAIL% by CLSIZE%.
  24.     '
  25.     '  All numeric parameters passed to an assembly language routine
  26.     '  from BASIC must be in integer format.  Either execute a
  27.     '  DEFINT at the top of your BASIC program or suffix the numeric
  28.     '  variables with '%'.
  29.     '
  30.     '  Since the result of the multiplication will probably exceed the
  31.     '  32767 limit of integers make sure you place each returned value
  32.     '  of the call into a double precision number, for example:
  33.     '
  34.     '  CLAVAIL# = CLAVAIL%
  35.     '  CLSIZE#  = CLSIZE%
  36.     '  BYTES.LEFT# = CLAVAIL# * CLSIZE#
  37.     '
  38.     '              - Or -
  39.     '
  40.     '  BYTES.LEFT# = CLAVAIL%
  41.     '  BYTES.LEFT# = BYTES.LEFT# * CLSIZE%
  42.     '
  43.     '
  44.     '  Do not try BYTES.LEFT# = CLAVAIL% * CLSIZE% since BASIC
  45.     '  computes from right to left, you will receive an OVERFLOW
  46.     '  error before it gets to place the result into BYTES.LEFT#
  47.     '
  48.     '
  49.     DRV%     = 3
  50.     CLAVAIL% = 0
  51.     CLSIZE%  = 0
  52.     '
  53.     CALL CSSAVAIL(DRV%,CLAVAIL%,CLSIZE%)
  54.     '
  55.     BYTES.LEFT# = CLAVAIL%
  56.     BYTES.LEFT# = BYTES.LEFT# * CLSIZE%
  57.     '
  58.     CLS
  59.     PRINT "Number of bytes available on drive C: ... ";BYTES.LEFT#
  60.     '
  61.     END
  62.